import storage from '@/utils/storage'

const StoragePlugin = {
  install(app, options) {
    // 方式1：provide/inject (推荐)
    app.provide('storage', storage)
    
    // 方式2：全局属性 (可选)
    app.config.globalProperties.$storage = storage
    
    // 处理配置
    if (options?.prefix) {
      storage.prefix = options.prefix
    }
  }
}

export default StoragePlugin